<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>挑战</title>
    <style>
        body {
            max-width: 500px;
            margin: 0 auto;
        }

        #box {
            width: 100%;
        }

        #ifr {
            width: 100%;
            height: 1500px;
        }

        button {
            margin: 0 10px;
        }
    </style>
</head>

<body>
    <div id="box">
        <div id="start">开始时间：</div>
        <div id="end">结束时间：</div>
        <div>当前对战ID：
            <span id="pkid"></span>
        </div>
        <div>已挑战人数：
            <span id="pknum"></span>
        </div>
        <div>总人数：
            <span id="sunum"></span>
        </div>
        <br>
        <div>
            <button type="button" onclick="startFun1()">开始全部</button>
            <button type="button" onclick="startFun2()">开始后边</button>
            <button type="button" onclick="startFun3()">换号</button>
            <button type="button" onclick="startFun4()">停止</button>
        </div>
        <br>
        <iframe id="ifr" src="http://txqq789.com/home/my_home.aspx" frameborder="0"></iframe>
    </div>
    <script type="text/javascript" charset="utf-8" src="./index.js"></script>
    <script>
        // id名单
        var idlist = [
            29984, 30080, 10000, 28935, 29429, 24656, 28906, 30123, 30115, 30198,
            30240, 30512, 30876, 30541, 30589, 30658, 31020, 31031, 30894,
            31079, 28905, 24954, 29148, 28987, 29961, 29802, 26414, 26767,
            29005, 29019, 29025, 29030, 29034, 29038, 29039, 29053, 29057, 29059,
            29069, 29070, 29071, 29075, 29076, 29085, 29086, 29090, 29092, 29073,
            29099, 29094, 29098, 29101, 29103, 29107, 29110, 29113, 29114, 29116,
            29134, 29137, 29118, 29124, 29133, 29135, 29144, 26772, 26784, 26786,
            26792, 26788, 26793, 26794, 26803, 26811, 26814, 26815, 26819, 26820,
            26845, 26858, 26859, 26860, 26868, 26871, 26877, 26882, 26887, 26890,
            26910, 26895, 26913, 26919, 26920, 28888, 28896, 28897, 28898, 28900,
            26415, 26425, 26429, 26437, 26446, 26450, 26452, 26473, 26511, 26516,
            26575, 26517, 26525, 26532, 26557, 26574, 26588, 26602, 26605, 26621,
            26692, 26658, 26659, 26665, 26683, 26695, 26707, 26718, 26727, 26711,
            26753, 26762, 26763, 26765, 11321, 11749, 11829, 12025, 12026, 12069,
            12132, 12426, 12456, 12461, 12906, 12964, 12966, 13335, 13397, 13431,
            13497, 23190, 23196, 24554, 24586, 24605, 24655, 25327, 25354, 25356,
            25360, 25361, 25476, 25769, 26133, 26143, 26156, 26175, 26176, 26180,
            26259, 26297, 26306, 26332, 26333, 26340, 26356, 26361, 26365, 26313,
            26372, 26373, 26398, 29804, 29821, 29822, 29828, 29831, 29834, 29808,
            29835, 29836, 29867, 29868, 29872, 29891, 29893, 29896, 29904, 29912,
            29978, 29914, 29916, 29925, 29933, 29938, 29950, 29954, 29973, 29975,
            28993, 28994, 28995, 28996, 29001, 29003, 29998, 30010, 30011, 30012,
            30017, 30024, 30026, 30033, 30036, 30041, 30047, 30052, 30053, 30071,
            29217, 29220, 29224, 29245, 29249, 29252, 29254, 29255, 29272, 29277,
            29280, 29287, 29291, 29292, 29300, 29321, 29323, 29327, 29328, 29332,
            29360, 29373, 29382, 29388, 29397, 29425, 29428, 29693, 29694, 29699,
            29731, 29749, 29769, 29705, 29714, 29729, 29744, 29747, 29771, 29732,
            29776, 29778, 29797, 29799, 29800, 29155, 29161, 29167, 29171, 29174,
            29177, 29178, 29189, 29191, 29200, 29207, 29203, 28943, 28944, 29198,
            28981, 28947, 28953, 28956, 28959, 28963, 28975, 28986, 24985, 25035,
            24881, 25138, 25181, 10790, 11197, 24916, 24947, 10062, 10163, 24921,
            10193, 10215, 29432, 29440, 29444, 29448, 29449, 29455, 29458, 29461,
            29463, 29489, 29464, 29466, 29474, 29479, 29481, 29492, 29498, 29499,
            29503, 29505, 29506, 29519, 29523, 29534, 29535, 29539, 59544, 29548,
            29553, 29563, 29566, 29567, 29572, 29577, 29579, 29580, 29581, 29583,
            29585, 29586, 29591, 29602, 29603, 29604, 29624, 29626, 29629, 29606,
            29631, 29633, 29647, 29657, 29657, 29661, 31080, 31083, 31092, 31096,
            31130, 31098, 31103, 31115, 31116, 31123, 31126, 31128, 31137, 31138,
            31143, 31152, 31154, 31157, 31158, 31159, 31161, 31162, 31164, 31168,
            30896, 31170, 31177, 31180, 31189, 31191, 31192, 31202, 31203, 840717,
            30906, 30898, 30903, 30905, 30913, 30914, 30926, 30933, 30935, 30936,
            30946, 30953, 30954, 30956, 30961, 30974, 30977, 30982, 30983, 30987,
            30992, 31006, 30988, 30996, 30997, 31001, 31007, 31017, 31069, 31071,
            31074, 31050, 31051, 31059, 31060, 31033, 31039, 31045,
            31028, 31030, 30661, 30675, 60677, 30679, 30685, 30687, 30693, 30697,
            30709, 30710, 30711, 30714, 30715, 30716, 30727, 30730, 30734, 30735,
            30739, 30740, 30749, 30751, 30754, 30764, 30766, 30777, 30789, 30792,
            30796, 30838, 30797, 30813, 30820, 30821, 30833, 30835, 30843, 30847,
            30854, 30857, 30861, 30862, 30863, 30865, 30871, 30873, 30874, 30592,
            30599, 30600, 30623, 30631, 30637, 30638, 30639, 30641, 30644, 30647,
            30883, 30648, 30649, 30551, 30553, 30558, 30536, 30513, 30515, 30517,
            30526, 30518, 30520, 30527, 30530, 30532, 30562, 30564, 30566, 30583,
            30248, 30283, 30584, 30586, 30588, 30258, 30265, 30266, 30269, 30272,
            30295, 30299, 30303, 30309, 30310, 30312, 30315, 30321, 30322, 30323,
            30375, 30390, 30324, 30333, 30345, 30352, 30364, 30376, 30381, 30382,
            30493, 30392, 30395, 30396, 30399, 30405, 30417, 30418, 30482, 30484,
            30500, 30229, 30503, 30505, 30510, 30203, 30212, 30217, 30227, 30228,
            30138, 30233, 30238, 30121, 28913, 28931, 30082, 30083, 30093, 30124,
            30139, 30142, 30146, 30147, 30150, 30153, 30160, 30162, 30169, 30175,
            30182, 30183, 30185];
        var num1 = 0;
        var num2 = 15;
        var max = idlist.length - 1;
        var ifr = document.getElementById("ifr");
        var start = document.getElementById("start");
        var end = document.getElementById("end");
        var pkid = document.getElementById("pkid");
        var pknum = document.getElementById("pknum");
        var sunum = document.getElementById("sunum");
        start.innerText = "开始时间：" + new Date();
        var timer1, timer2;
        function startFun1() {
            sunum.innerText = max;
            timer1 = setInterval(function () {
                if (num1 >= max) {
                    clearInterval(timer1);
                    end.innerText = "结束时间：" + new Date();
                }
                pknum.innerText = num1;
                pkid.innerText = idlist[num1];
                ifr.src = "http://txqq789.com/game/arena/contest.aspx?id=" + idlist[num1];
                num1++;
            }, 1300)
        }
        function startFun2() {
            sunum.innerText = max - num2;
            timer2 = setInterval(function () {
                if (num2 >= max) {
                    clearInterval(timer2);
                    end.innerText = "结束时间：" + new Date();
                }
                pknum.innerText = num2;
                pkid.innerText = idlist[num2];
                ifr.src = "http://txqq789.com/game/arena/contest.aspx?id=" + idlist[num2];
                num2++;
            }, 1300)
        }
        function startFun3() {
            clearInterval(timer1);
            clearInterval(timer2);
            ifr.src = "http://txqq789.com/login/login.aspx";
        }
        function startFun4() {
            clearInterval(timer1);
            clearInterval(timer2);
        }
    </script>
</body>

</html>